<?php
我去额外企鹅我去
header("content-type:text/html;charset=GBK");


$serverName = "58.62.223.99"; //数据库服务器地址
$uid = "kduser"; //数据库用户名
$pwd = "aA1"; //数据库密码
$connectionInfo = array("UID"=>$uid, "pwd"=>$pwd, "Database"=>"AIS20191012155349");
$conn = sqlsrv_connect( $serverName, $connectionInfo);

if($conn == false)
{
// echo 400002;return;/*连接失败*/
die( print_r( sqlsrv_errors(), true));
}
$sql = "select TOP 100 a.fnumber,a.fname,a.fmodel,b.fname funitname
					from t_icitem a
					join t_MeasureUnit b on a.FUnitID=b.FMeasureUnitID
					where a.fnumber like'11.%' and a.f_126 = 0";
$query = sqlsrv_query($conn,$sql);
$json_arr = array();

while($row = sqlsrv_fetch_array($query))
{
	$json_arr[] = $row;
}
echo "<pre>";print_r($json_arr);die;